//
//  MXFooderPlanView.m
//  HNBaseProject
//
//  Created by xujie on 2024/6/4.
//

#import "MXFooderPlanView.h"

@implementation MXFooderPlanView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self createUI];
    }
    return self;
}

- (void)createUI {
    self.userInteractionEnabled = YES;
    self.backgroundColor = [UIColor whiteColor];
    self.layer.cornerRadius = 8;
    self.layer.masksToBounds = YES;
    self.icon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fooder_list"]];
    [self addSubview:self.icon];
    
    self.titleLab = [[UILabel alloc] init];
    [self addSubview:self.titleLab];
    self.titleLab.text = @"喂食记录";
    self.titleLab.textColor = [UIColor colorWithHexString:@"#000000"];
    self.titleLab.font = PFRFontMedium(13);
    
    [self.icon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.width.mas_equalTo(21);
        make.left.offset(20);
        make.centerY.mas_equalTo(self);
    }];
    
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(56);
        make.centerY.mas_equalTo(self);
    }];
}

@end
